package fr.emse.tatiana.cordtravisualisation;

import fr.emse.tatiana.replayable.IReplayableModel;

public class ReplayableFacet {
	public final IReplayableModel replayable;
	public final Object event;
	public final int facet;
	public ReplayableFacet(IReplayableModel replayable, Object event, int facet) {
		super();
		this.replayable = replayable;
		this.event = event;
		this.facet = facet;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((event == null) ? 0 : event.hashCode());
		result = prime * result + facet;
		result = prime * result
				+ ((replayable == null) ? 0 : replayable.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ReplayableFacet other = (ReplayableFacet) obj;
		if (event == null) {
			if (other.event != null)
				return false;
		} else if (!event.equals(other.event))
			return false;
		if (facet != other.facet)
			return false;
		if (replayable == null) {
			if (other.replayable != null)
				return false;
		} else if (!replayable.equals(other.replayable))
			return false;
		return true;
	}

	
}
